New Data Types and Accessor Functions

The Carbon Printing Manager replaces the original print record ( TPrint ) with two opaque data types, the PMPrintSettings object and the PMPageFormat object. All references to elements of the TPrint record in your code must be updated to refer to one of these objects, using the new accessor functions provided.

Because the PMPrintSettings and PMPageFormat objects are opaque, your application must not make assumptions about their size or internal structure. You will need to update any code that loads, stores, or directly manipulates the TPrint record.

The following table lists the accessor functions you can use to examine elements of the PMPrintSettings and PMPageFormat objects. See the Reference section for descriptions of these functions.

New accessor functions for original print record (TPrint) fields
Data Structure Element Accessor
TPrInfo iDev not supported
iVRes PMGetResolution
iHRes PMGetResolution
rPage PMGetAdjustedPageRect
TPrStl wDev PMGetImagingLanguage , PMGetOrientation
iPageV PMGetAdjustedPageRect
iPageH PMGetAdjustedPageRect
bPort not supported
feed not supported
TPrXInfo not supported
TPrJob iFstPage PMGetFirstPage
iLstPage PMGetLastPage
iCopies PMGetCopies
bJDocLoop not supported
fFromUsr not supported
pIdleProc PMSetIdleProc
pFileName not supported
iFileVol not supported
bFileVers not supported
bJobX not supported
TPrint iPrVersion PMGetDriverReleaseInfo
prInfo see TPrInfo
rPaper PMGetAdjustedPaperRect
prStl see TPrStl
prInfoPT not supported
prXInfo not supported
prJob see TPrJob
printX[19] not supported

When you use these accessor functions, be sure to pass the appropriate constant for any parameters you do not want to pass to the function or receive from it. For example, pass the kPMDontWantData constant in place of a parameter that returns data you're not interested in. See the Reference section for a list of new constants defined by the Carbon Printing Manager.

Your application must dispose of any structures, references, or other data returned by Carbon Printing Manager functions. Your application should also dispose of the PMPrintSettings and PMPageFormat objects when they are no longer needed.